The UK National Electricity Transmission System Dataset

Intro

The UKgrid is an R dataset package with the historical national demand of the electricity transmission system in the UK and other related variables. This dataset is a half-hourly time series data with observations since April 2005. This dataset was sourced from National Grid UK website.

Installation

Install the package from CRAN:

or install the development version from Github:

Usage

A variable dictionary is available in the dataset documentation.

The extract_grid function

The extract_grid function provides the ability to extract the UKgrid series in a different format (xts, zoo, ts, data.frame, data.table and tbl), frequencies (half-hourly, hourly, daily, weekly, monthly and quarterly), and subset the series by time frame.

For example, you can select the national demand variable (ND), using xts format:

Alternatively, you can aggregate the series to an hourly frequency with the aggregate argument:

Selection of the UKgrid columns is done by the columns argument. The full list of columns is available on the dataset documentation (?UKgrid). For instance, let’s select the “ND” and “TSD” columns in a daily format:

Note: by default, when any of the data frame family structure is used, the output will include the timestamp of the data (even if was not selected in the columns argument)

Last but not least, you can subset the series by time range with the start and end argument: